package top.chukongxiang.monitorservice.components;

import cn.hutool.core.util.HexUtil;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;

/**
 * @author 楚孔响
 * @version 1.0
 * @date 2023/11/3 10:07
 */
@Slf4j
@RequiredArgsConstructor
public class PreviewDataHandler {

    private final Long serverId;

    private final Integer channelNo;

    public void writeSysHeader(byte[] bytes) {
        String hex = HexUtil.format(HexUtil.encodeHexStr(bytes));
        log.info("系统头：{}", hex);
    }

    public void writeVideo(byte[] b) {
        String hex = HexUtil.format(HexUtil.encodeHexStr(b));
        log.info("视频: {}", hex);
    }

    public void writeAudio(byte[] b) {
        String hex = HexUtil.format(HexUtil.encodeHexStr(b));
        log.info("音频: {}", hex);
    }
}
